/**
 * Copyright &copy; 2020 <a href="https://github.com/somowhere/exam-system">exam-system</a> All rights reserved.
 */
package com.shanhesoft.java.modules.exam.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.shanhesoft.java.common.core.vo.PageModel;
import com.shanhesoft.java.common.persistence.service.impl.DataServiceImpl;
import com.shanhesoft.java.modules.exam.domain.OjProblemCheckpoints;
import com.shanhesoft.java.modules.exam.domain.dto.OjProblemCheckpointsDto;
import com.shanhesoft.java.modules.exam.domain.vo.OjProblemCheckpointsVo;
import com.shanhesoft.java.modules.exam.repository.OjProblemCheckpointsRepository;
import com.shanhesoft.java.modules.exam.service.OjProblemCheckpointsService;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 编程题用例ServiceImpl 编程题用例
 * @author admin
 * @version 2020-09-26 20:53:06
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class OjProblemCheckpointsServiceImpl extends DataServiceImpl<OjProblemCheckpointsRepository, OjProblemCheckpoints, OjProblemCheckpointsDto, String> implements OjProblemCheckpointsService{
	@Override
	public void saveOrUpdate(OjProblemCheckpointsDto ojProblemCheckpointsDto) {
		super.saveOrUpdate(ojProblemCheckpointsDto);
	}

	@Override
	public IPage<OjProblemCheckpointsVo> findPage(PageModel pm, QueryWrapper wrapper) {
		wrapper.eq("a.del_flag", OjProblemCheckpoints.FLAG_NORMAL);
		return repository.findCheckpointsVoPage(pm, wrapper);
	}

	@Override
	public OjProblemCheckpointsVo findVoById(String id) {
		return repository.findCheckpointsVoById(id);
	}
}
